using System;
using System.Collections.Generic;
using System.Text;
using Barrage.Global;
using Barrage.GUI.Templates;
using Barrage.GUI.Elements;
using System.Xml;
using Barrage.GUI.Templates.Standard;

namespace Barrage.GUI
{
    sealed class GUITemplateTypes
    {
        private GUITemplateTypes() { }
        public const string Standard = "Standard";
    }
    
    sealed class GUITemplateManager
    {
        public static GUIButton CreateButton(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButton(layout, xn);
            }
            return null;
        }

        public static GUIImage CreateImage(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIImage(layout,xn);
            }
            return null;
        }

        public static GUIText CreateText(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIText(layout, xn);
            }
            return null;
        }

        public static GUIButtonList CreateButtonList(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonList(layout, xn);
            }
            return null;
        }

        public static GUIButtonListOption CreateButtonListOption(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonListOption(layout,xn);
            }
            return null;
        }

        public static GUIButtonListSlider CreateButtonListSlider(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonListSlider(layout, xn);
            }
            return null;
        }

        public static GUIButtonListSelector CreateButtonListSelector(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonListSelector(layout, xn);
            }
            return null;
        }

        public static GUIButtonListNumberSelector CreateButtonListNumberSelector(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonListNumberSelector(layout, xn);
            }
            return null;
        }

        public static GUIButtonListCheckbox CreateButtonListCheckbox(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonListCheckbox(layout, xn);
            }
            return null;
        }

        public static GUIButtonListColorPicker CreateButtonListColorPicker(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonListColorPicker(layout, xn);
            }
            return null;
        }

        public static GUIButtonListTextInput CreateButtonListTextInput(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUIButtonListTextInput(layout, xn);
            }
            return null;
        }        

        public static GUICursor CreateCursor(GUILayout layout, string template, XmlNode xn)
        {
            switch (template)
            {
                case GUITemplateTypes.Standard:
                    return new StandardGUICursor(layout, xn);
            }
            return null;
        }
    }
}
